/*
 * @Author: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @Date: 2024-04-11 15:35:31
 * @LastEditors: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @LastEditTime: 2024-04-11 19:33:21
 * @FilePath: \vue-project\src\api\user\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import instance from '@/utils/request'
import type { loginForm, loginResData, userInfo } from './type'

enum API {
  LOGIN_URL = '/user/login',
  USERINFO_ULR = '/user/info'
}
export const login = (data: loginForm) => instance.post<any, loginResData>(API.LOGIN_URL, data)

export const getUserInfo = () => {
  return instance.get<any, userInfo>(API.USERINFO_ULR)
}
